<?php

namespace app\services\portal;

use app\dao\portal\PortalStudyHelpDao;
use app\services\BaseService;

class PortalSchoolHelpService extends BaseService
{

    public function __construct(PortalStudyHelpDao $dao)
    {
        $this ->dao = $dao;
    }

    public function index($where)
    {
        return $this ->dao -> index($where);
    }

    public function update(array $where)
    {
        if ($where['id'] === 0){
            return  $this ->dao -> create($where);
        }else{
            return $this ->dao -> updateDao($where);

        }
    }

}